package com.pet.api.client;

import com.pet.api.dto.OrderDetailDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Collection;
import java.util.List;

@FeignClient("cart-service")
public interface CartClient {
    @PostMapping("/carts/order-remove")
    void removeItemsByIds(@RequestParam("ids") Collection<Integer> ids);

    @PostMapping("/carts/order-add")
    void addItemsById(@RequestBody List<OrderDetailDTO> detailDTOList);
}